from random import randint

from utils.log import Log


class Node(Log):
    def __init__(self, val):
        super(Node, self).__init__()
        self.val = val
        self.next = None
        self.prev = None

    # 定义了该方法,则在比较的时候是根据指定的value去比较
    # def __eq__(self, other):
    #     if isinstance(other, Node):
    #         return self.val == other.val
    #     return False

    def __repr__(self):
        return f"{self.__class__.__name__} {self.val}"


if __name__ == '__main__':
    n1 = Node(3)
    n2 = Node(3)
    print(n1 == n2)
